[ykg_id].vue 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203
  1. <script setup>
  2. import request from "~/utils/request";
  3. import {REQUEST} from "~/utils/request";
  4. import {user} from "~/store";
  5. import {useRouter} from "vue-router";
  6. const router = useRouter();
  7. console.log(router,7)
  8. const route = useRoute();
  9. const linkTo = (obj) => {
  10. router.push(obj);
  11. };
  12. let type_list = $ref([{
  13. id:'qks',
  14. name:'缺考'
  15. },{
  16. id:'xhycs',
  17. name:'学号异常'
  18. },{
  19. id:'ymycs',
  20. name:'页码异常',
  21. },{
  22. id:'qkycs',
  23. name:'缺考异常'
  24. },{
  25. id:'kgtycs',
  26. name:'客观题异常'
  27. },{
  28. id:'xztycs',
  29. name:'选择题异常'
  30. },{
  31. id:'pdtycs',
  32. name:'判断题异常'
  33. },{
  34. id:'tktycs',
  35. name:'填空题异常'
  36. }])
  37. let cur_type = $ref({
  38. id:'qks',
  39. name:'缺考'
  40. })
  41. let ykj_id = $ref('')
  42. let ykg_id = $ref('')
  43. let ykg_name = $ref('')
  44. let limit = $ref(10);
  45. let total = $ref(0);
  46. let cur_page = $ref(1);
  47. let listData = $ref([]);
  48. let fullscreenLoading = $ref(false);
  49. function switchType(item) {
  50. cur_type = item;
  51. cur_page = 1;
  52. getListData();
  53. }
  54. function getListData() {
  55. fullscreenLoading = true;
  56. let data = {
  57. page: cur_page,
  58. ykg_id:ykg_id,
  59. limit: limit,
  60. tab:cur_type.id
  61. };
  62. request({
  63. url: "/yzy/scan/kd_detail",
  64. data: data,
  65. }).then((res) => {
  66. fullscreenLoading = false;
  67. if (res.code === '1') {
  68. ykg_name = res.data.kc_info.ykg_name;
  69. listData = res.data.page_data;
  70. total = Number(res.data.total_rows);
  71. cur_page = Number(res.data.page_now);
  72. }
  73. })
  74. }
  75. const handleSelectionChange = (val) => {
  76. cur_page = val;
  77. getListData();
  78. };
  79. if (route.params.ykg_id) {
  80. ykg_id = route.params.ykg_id;
  81. ykj_id = route.params.ykj_id;
  82. getListData();
  83. }
  84. </script>
  85. <route lang="json">
  86. {
  87. "meta":{
  88. "title":"考点扫描进度详情",
  89. "breadcrumb":true
  90. }
  91. }
  92. </route>
  93. <template>
  94. <NavHeader/>
  95. <bread-crumb/>
  96. <div class="w-1200px m-auto" v-loading.fullscreen.lock="fullscreenLoading">
  97. <div class="relative -mt-40px flex justify-end">
  98. <button type="button" class="back-btn" @click="linkTo({name:'process-kdsmjd-ykj_id',params:{ykj_id:ykj_id}})">返回</button>
  99. </div>
  100. <div class="mt-10px w-full bg-hex-fff py-20px px-15px">
  101. <h3 class="mb-45px text-18px text-center">{{ykg_name}}</h3>
  102. <ul class="type-list">
  103. <li v-for="item in type_list" :class="item.id === cur_type.id?'selected':''" @click="switchType(item)">
  104. {{item.name}}
  105. <span></span>
  106. </li>
  107. </ul>
  108. <div v-if="listData.length > 0">
  109. <ul class="mt-10px stu-list min-h-400px">
  110. <li v-for="item in listData">
  111. <h3 class="text-16px">{{item.sm_name}}</h3>
  112. <h3 class="text-16px mt-8px">{{item.ykg_name}}</h3>
  113. <h3 class="text-16px mt-8px">{{item.student_no}}&nbsp;&nbsp;{{item.user_realname}}</h3>
  114. </li>
  115. </ul>
  116. <div class="mt-20px page-new flex justify-end">
  117. <el-pagination v-model:current-page="cur_page" v-model:page-size="limit" layout="total,prev, pager, next"
  118. :total="total" :background="true" @current-change="handleSelectionChange"></el-pagination>
  119. </div>
  120. </div>
  121. <div v-else class="no-data">
  122. <div>
  123. <h3 class="no-data-img"></h3>
  124. <h4 class="mt-25px text-18px text-hex-0048e5 text-center">暂无数据</h4>
  125. </div>
  126. </div>
  127. </div>
  128. </div>
  129. </template>
  130. <style scoped lang="scss">
  131. $color: #0048e5;
  132. ::v-deep .el-pagination.is-background .btn-next.is-active,
  133. ::v-deep .el-pagination.is-background .btn-prev.is-active,
  134. ::v-deep .el-pagination.is-background .el-pager li.is-active {
  135. background-color: $color;
  136. }
  137. .type-list{
  138. width: 100%;
  139. border-bottom: 1px solid #D4E1FF;
  140. display: flex;
  141. align-items: center;
  142. padding-left: 10px;
  143. li{
  144. position: relative;
  145. width: 100px;
  146. font-size: 16px;
  147. color: #595959;
  148. padding-bottom: 15px;
  149. text-align: center;
  150. cursor: pointer;
  151. &+li{
  152. margin-left: 25px;
  153. }
  154. &.selected{
  155. font-size: 18px;
  156. color: #0148E5;
  157. span{
  158. display: block;
  159. }
  160. }
  161. span{
  162. display: none;
  163. position: absolute;
  164. left: 0;
  165. bottom: 0;
  166. width: 100%;
  167. height: 4px;
  168. background: #0148e5;
  169. border-radius: 2px;
  170. }
  171. }
  172. }
  173. .stu-list{
  174. width: 100%;
  175. display: flex;
  176. flex-wrap: wrap;
  177. align-items:flex-start;
  178. li{
  179. width: 237px;
  180. height: auto;
  181. background: #f1f7ff;
  182. border-radius: 40px;
  183. margin: 35px 0 0 35px;
  184. padding: 20px 0;
  185. text-align: center;
  186. }
  187. }
  188. .no-data {
  189. width: 100%;
  190. height: 450px;
  191. display: flex;
  192. justify-content: center;
  193. align-items: center;
  194. .no-data-img {
  195. width: 233px;
  196. height: 199px;
  197. background: url("/images/no-data.png") center no-repeat;
  198. }
  199. }
  200. </style>